package com.sunjob.mrologdb.logConsumer;

import com.sunjob.common.domain.system.SysExecLog;
import com.sunjob.mrologdb.mapper.SysExecLogMapper;
import lombok.extern.slf4j.Slf4j;
import org.apache.ibatis.annotations.Mapper;
import org.apache.kafka.clients.consumer.ConsumerRecord;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.kafka.annotation.KafkaListener;

/**
 * Created by IntelliJ IDEA.
 *
 * @Author : Wangzurong
 * @create 2022-08-01 14:20
 * 操作日志持久化类
 */
@Configuration
@Slf4j
public class ExecLogConsumer {
    @Autowired
    SysExecLogMapper sysExecLogMapper;

    @KafkaListener(topics = {"execLog"})
    public void execLogDB(SysExecLog sysExecLog) {
        sysExecLogMapper.saveExecLog(sysExecLog);
    }


}
